#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <tcp_client.h>
#include <QString>
#include <QDebug>
#include <QTcpSocket>
#include <QHostAddress>
#include <tcp_server.h>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
private:
    QString client_or_server;
    // tcp 客户端的类
    TCP_client client;
    tcp_server server;

private slots:
    void on_pushButton_2_clicked(bool checked);

    void on_comboBox_currentIndexChanged(const QString &arg1);

    void on_pushButton_clicked();

private:
    Ui::Widget *ui;
};
#endif // WIDGET_H
